home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 463 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1006 b 

  1. Path: solon.com!not-for-mail
  2. From: hraiser@cloud9.net
  3. Newsgroups: comp.lang.c,comp.lang.c.moderated
  4. Subject: Re: Leading and Trailing Blanks
  5. Followup-To: comp.lang.c,comp.lang.c.moderated
  6. Date: 5 Jan 1996 09:52:46 -0600
  7. Organization: Cloud 9 Internet, White Plains, NY, USA
  8. Sender: clc@solutions.solon.com
  9. Approved: clc@solutions.solon.com
  10. Message-ID: <4cjhge$f7g@solutions.solon.com>
  11. References: <4chh1b$685@solutions.solon.com>
  12. NNTP-Posting-Host: solutions.solon.com
  13. X-Newsreader: TIN [UNIX 1.3 950824BETA PL0]
  14.  
  15.  
  16. Casey Claiborne (mskc@io.com) wrote:
  17. : Hello -
  18. :     I am wondering if anyone out there has a program (or knows of one)
  19. : that allows one to strip leading and trailing blanks from a string. 
  20. : ex:
  21. :     char test[20];
  22. :     strcpy(test,"  TESTING  ");
  23. :     printf("%s", test);
  24. : will produce an output like
  25. :   TESTING  
  26.  
  27.   Check out Snipets 10/95 at Simtel \msdos\c\snip1095.zip.  You will will
  28. 100s of C programming functions and tips, incuding deadling with trailing
  29. and leading blanks.
  30.